1. Field of the Invention
The present invention relates to a drawing processing apparatus for computing drawing data and a method for compressing drawing data.
2. Description of the Related Art
In general, the three-dimensional (3D) computer graphics utilizes a polygon model to represent an object in a 3D space using a number of polygons. In drawing a polygon model, shading is performed such that a light source, the location of an eye point, and the surface light reflectivity of an object are taken into account to shade the surface of a polygon. To produce a highly photorealistic image, texture mapping is also performed to map a texture image to the surface of a polygon model.
Displaying pixel colors using bit maps on the screen of a display device may result in an undesirably drawn image such as a diagonal line appearing as a stepped line or a thinner line than one pixel disappearing due to a limited resolution. This phenomenon is referred to as “aliases” or “jaggies.” In order to improve the drawing quality of computer graphics, anti-aliasing is performed to alleviate such jaggies.
There is a technique called over sampling or super sampling, which is available for anti-aliasing. According to this technique, one pixel is divided into a unit of smaller sub-pixels to thereby produce drawing data temporarily at a higher resolution. When an image is actually output on a display device, the sub-pixels are reduced into one-pixel information, and the pixel data is output on the display device at the original resolution. Upon final conversion into one-pixel data, such processing as averaging color values is performed on a per sub-pixel unit basis. For example, assuming that one pixel is a 4 by 4 matrix of 16 sub-pixels in total, the one pixel is drawn virtually on a per sub-pixel basis at a resolution increased four times for the row and column. When being actually displayed, the row and column are reduced to one fourth, so that the color values of the total of 16 virtual sub-pixels are averaged to be employed as the color value of the original one pixel.
In the aforementioned over sampling, assuming that a pixel is a virtual matrix of multiple sub-pixels, the set of sub-pixels is computed for drawing. Accordingly, this causes the amount of computation to increase in proportion to the number of sub-pixels, thereby requiring correspondingly increased time for drawing processing. The amount of data to be computed for drawing processing also increases in proportion to the number of sub-pixels, thereby resulting in an increase in the required amount of memory. As such, an attempt to improve the quality of drawing by anti-aliasing would cause an increase in pixel information, thus resulting in the hardware being further burdened in both aspects of the required amount of computation and memory.